﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;

namespace KPIS.GERP.Models.HRM
{
    [DataContract, Table("hrm_mp_job_site_statuses")]
    public class MasJobSiteStatus
    {
        public MasJobSiteStatus()
        {
            RecordStatus = "U";
        }

        [Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        [DataMember, Display(Name = "JobSiteStatusId", ResourceType = typeof(Resources.MasJobSiteStatusResource))]
        [Column("job_site_stat_seq")]
        public int JobSiteStatusId { get; set; }

        [DataMember, Display(Name = "Name", ResourceType = typeof(Resources.MasJobSiteStatusResource))]
        [Column("job_site_stat_name")]
        public string Name { get; set; }

        [DataMember, Display(Name = "Remarks", ResourceType = typeof(Resources.MasJobSiteStatusResource))]
        public string Remarks { get; set; }

        [EnumDataType(typeof(SYS.RecordStatus.EnumRecordStatus))]
        [DataMember, Display(Name = "RecordStatus", ResourceType = typeof(Resources.MasJobSiteStatusResource))]
        [Column("record_status")]
        public string RecordStatus { get; set; }

        [Column("created_by")]
        public int? CreatedBy { get; set; }

        [Column("created_when")]
        public DateTime? CreatedWhen { get; set; }

        [Column("updated_by")]
        public int? UpdatedBy { get; set; }

        [Column("updated_when")]
        public DateTime? UpdatedWhen { get; set; }

        [DataMember]
        public virtual ICollection<JobSite> JobSites { get; set; }
    }
}
